/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package login;

import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author 47
 */
public class Logoff {

    public Logoff() {
    }

    public boolean logoff(){
        boolean isOK=true;
        try{
            this.getHttpRequest().getSession().invalidate();
        }catch(Exception ex){
            isOK=false;
        }
        return isOK;
    }

    private HttpServletRequest httpRequest;

    /**
     * @return the httpRequest
     */
    public HttpServletRequest getHttpRequest() {
        return httpRequest;
    }

    /**
     * @param httpRequest the httpRequest to set
     */
    public void setHttpRequest(HttpServletRequest httpRequest) {
        this.httpRequest = httpRequest;
    }

}
